<template>
  <div>
    <div v-for="(item, i) in workList" :key="i">
      <span class="index-num">执行信息 {{ i + 1 }}</span>
      <itemList
        :ref="'itemList' + i"
        :spareParts="item.orderExecutePart"
      ></itemList>
    </div>
  </div>
</template>

<script>
import itemList from "./itemList.vue";
export default {
  components: {
    itemList,
  },
  props: {
    exexuteInfo: {
      type: Array,
      default: () => {
        return [];
      },
    },
  },
  data() {
    return {
      workList: [],
    };
  },
  created() {
    this.workList = this.exexuteInfo;
  },
  methods: {
    init() {},
    getFormData() {
      this.workList.forEach(async (item, index) => {
        item.orderExecutePart = await this.$refs['itemList'+index][0].getPartsData();
      });
      return this.workList;
    },
  },
};
</script>

<style></style>
